import { createApp } from 'vue'
import AppComponent from './App.vue'
import router from './router/router.js'
import store from './store/store.js'
// import VueClipboard from 'vue-clipboard2'
import mitt from 'mitt' //事件插件
const _emitter = mitt() //生成事件插件实例
// import Swal from 'sweetalert2' //甜蜜弹窗
import 'dayjs/locale/zh-cn'

import 'element-plus/dist/index.css'

import '@/assets/common.less'
import 'nprogress/nprogress.css'

//创建全局vue实例
const App = createApp(AppComponent)

// App.use(VueClipboard)

//狗日的垃圾饿了么ui
import {
	 ElTag, ElBadge, ElPagination, ElButton, ElLoading, ElIcon, ElDialog, ElMessageBox, ElMessage,
	ElNotification, ElDropdown, ElDropdownMenu, ElDropdownItem, ElCarouselItem, ElStep,ElSteps, ElDrawer, ElTabs,
	ElTabPane, ElRow, ElCol, ElForm, ElImage, ElTable, ElTableColumn,
	ElFormItem,ElInput,ElRadio,ElRadioButton,ElCheckbox,ElInputNumber,
	ElCalendar,ElOption,ElSelect,ElEmpty
} from 'element-plus'


App.use(ElTag)
App.use(ElLoading)
App.use(ElBadge)
App.use(ElButton)
App.use(ElIcon)
// App.use(ElAlert)
App.use(ElDialog)
// App.use(ElPopover)
// App.use(ElTooltip)
// App.use(ElDropdown)
// App.use(ElDropdownMenu)
// App.use(ElDropdownItem)
// App.use(ElCarouselItem)
// App.use(ElDrawer)
// App.use(ElTabs)
// App.use(ElTabPane)
// App.use(ElRow)
// App.use(ElCol)
// App.use(ElForm)
// App.use(ElFormItem)
// App.use(ElInput)
// App.use(ElRadio)
// App.use(ElTable)
// App.use(ElTableColumn)
// App.use(ElCheckbox)
// App.use(ElRadioButton)
// App.use(ElInputNumber)
// App.use(ElImage)
// App.use(ElStep)
// App.use(ElSteps)
// App.use(ElPagination)
// App.use(ElCalendar)
// App.use(ElOption)
// App.use(ElSelect)
// App.use(ElEmpty)
// locale(lang) //element的语言设置


//方法类的插件不需要use，否则会相当于调用
App.config.globalProperties.$emitter = _emitter
App.config.globalProperties.$msgbox = ElMessageBox;
App.config.globalProperties.$confirm = ElMessageBox.confirm;
App.config.globalProperties.$prompt = ElMessageBox.prompt;
App.config.globalProperties.$alert = ElMessageBox.alert;
App.config.globalProperties.$notify = ElNotification;
App.config.globalProperties.$message = ElMessage;

// App.config.globalProperties.$_ = _ // 挂上underscore,不能只使用一个下线线，会报错，前面加个$
// App.config.globalProperties.$Swal = Swal

// 全局组件
// import breadCrumb from '@/components/breadCrumb'
// App.component('breadCrumb',breadCrumb);



App.use(store)
App.use(router)
App.mount('#app')
